
Public Class frmEscenario
    Dim objPantalla As cls_Pantalla

    Private Sub frmEscenario_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
        objPantalla.Refresh()
    End Sub

    Private Sub frmEscenario_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        Dim FD As cls_Figura.Direccion

        Select Case e.KeyCode
            Case Keys.Up
                FD = cls_Figura.Direccion.Arriba
                objPantalla.OprimeTecla(FD)
            Case Keys.Down
                FD = cls_Figura.Direccion.Abajo
                objPantalla.OprimeTecla(FD)
            Case Keys.Left
                FD = cls_Figura.Direccion.Izquierda
                objPantalla.OprimeTecla(FD)
            Case Keys.Right
                FD = cls_Figura.Direccion.Derecha
                objPantalla.OprimeTecla(FD)
            Case Keys.Pause
                objPantalla.Pause()
            Case Keys.F2
                If objPantalla.Game.GameOver Then
                    objPantalla = New cls_Pantalla(Pantalla)
                End If
        End Select


    End Sub

    Private Sub frmEscenario_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        objPantalla = New cls_Pantalla(Pantalla)
    End Sub

End Class